<?php

namespace App\Transformers\System;

use League\Fractal\TransformerAbstract;
use App\Models\System\SystemTechValue;

/**
 * Class SystemTechValueTransformer
 * @package namespace App\Transformers\System;
 */
class SystemTechValueTransformer extends TransformerAbstract
{

    /**
     * Transform the \SystemTechValue entity
     * @param \SystemTechValue $model
     *
     * @return array
     */
    public function transform(SystemTechValue $model)
    {
        return [
            'id'          => (int)$model->id,
            'type'        => $model->type,
            'value'       => $model->value,
            'description' => $model->description,
            'created_user' => $model->created_user,
            'created_at'  => $model->created_at->format('Y-m-d H:i:s'),
            'updated_at'  => $model->updated_at->format('Y-m-d H:i:s')
        ];
    }
}
